﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections.Specialized;

using Mvc.XForms.Utilities;

namespace Mvc.XForms.UI {
	public static class IPagedParametersExtensions {
		public static int GetPageIndex(this IPagedParameters p, NameValueCollection collection) {
			var pageIndex = collection[p.PageIndexKey].ParseIntDefault(1);
			return pageIndex;
		}
	}
}